package ullio.utils
{
	public class FilterUtils
	{
		private static var match:Boolean;
		// return true if all field values found on filter match values on item
		public static function getItemFilterMatch(filter:*, item:Object):Boolean{			
			match = true;
			for ( var key:String in filter )
    		{
    			if(key != "mx_internal_uid" && item.hasOwnProperty(key) ){    				
    				if (filter[key] != null && match)
    					match = filter[key] == item[key];
    			}else{
    				match = false;
    			} 
    		}	
			return match;
		}
	}
}